package com.ele.client.editor;

import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.TextArea;
import com.github.gwtbootstrap.client.ui.TextBox;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Widget;

public class QuestionView extends Composite implements QuestionPresenter.Display {

    interface DefaultUiBinder extends UiBinder<Widget, QuestionView> {}
    private static DefaultUiBinder uiBinder = GWT.create(DefaultUiBinder.class);

    @UiField
    TextArea questionTextArea;
//    @UiField
//    ListBox answerTypeListBox;
//    @UiField
//    TextArea answerTextTextArea;
    @UiField
    Button addAnswerButton;
    @UiField
    Button deleteButton;
    @UiField
    HTMLPanel answersPanel;
    @UiField
    Button generateAnswerButton;
    @UiField
    TextBox imgUrlTextBox;

    public QuestionView() {
        initWidget(uiBinder.createAndBindUi(this));
    }

    @Override
    public TextArea getQuestionTextArea() {
        return questionTextArea;
    }

//    @Override
//    public ListBox getAnswerTypeListBox() {
//        return answerTypeListBox;
//    }
//
//    @Override
//    public TextArea getAnswerTextTextArea() {
//        return answerTextTextArea;
//    }

    @Override
    public Button getAddAnswerButton() {
        return addAnswerButton;
    }

    @Override
    public Button getDeleteButton() {
        return deleteButton;
    }

    @Override
    public HTMLPanel getAnswersPanel() {
        return answersPanel;
    }

    @Override
    public Button getGenerateAnswerButton() {
        return generateAnswerButton;
    }

    @Override
    public TextBox getImgUrlTextBox() {
        return imgUrlTextBox;
    }
}
